import { createRouter, createWebHistory } from 'vue-router'
import Books from "@/views/Books.vue"

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: Books,
    },
    {
      path: "/details",
      name: "details",
      component: ()=>import("@/views/BooksDetail.vue")
    },
    {
      path: "/update",
      name: "update",
      component: ()=>import("@/views/Update.vue")
    },
    {
      path: '/add',
      name: 'Add',
      component: ()=>import("@/views/InsertBook.vue")
    }
  ],
})

export default router
